from Crypto.Cipher import AES
from Crypto.Util.Padding import pad
import base64


def aes_encrypt(data_string):
    key = "d245a0ba8d678a61"
    aes = AES.new(
        key=key.encode('utf-8'),
        mode=AES.MODE_ECB,
    )
    raw = pad(data_string.encode('utf-8'), 16)
    return aes.encrypt(raw)


data_string = "loginTokenplatformandroidtimestamp1684743596217uuid797753a6c9314853v5.0.6"
res = aes_encrypt(data_string)
value = base64.encodebytes(res)
result = value.replace(b"\n", b'')
print(result)
# knGGXR0bR7LQn4eRCvJsdZ4D96wrRcYi2zPWWxLMOs0uHRyeqMi1VKQV/IjBlJ8N51sjNbxZYEq6+eRP53pSiTVkGbwoxvA4U+hDiER4Q14='
# knGGXR0bR7LQn4eRCvJsdZ4D96wrRcYi2zPWWxLMOs0uHRyeqMi1VKQV/IjBlJ8N51sjNbxZYEq6+eRP53pSiTVkGbwoxvA4U+hDiER4Q14='